#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTreeView>
#include <QFileSystemModel>
#include <QWidget>
#include <QVBoxLayout>
#include <QPushButton>
#include <QFileDialog>
#include <QDir>
#include <QModelIndex>
#include <QTextEdit>
#include <QTextStream>

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    QTreeView * tree;
    QPushButton * button;
    QPushButton * close;
    QVBoxLayout * mainlay;
    QWidget * cwidget;
    QTextEdit * textEdit;
    QFileSystemModel * model;
    QString curdir;
    QString curfile;
    QPushButton * tsave;
    QVBoxLayout * tmain;
    QPushButton * tclose;
    QHBoxLayout * tlay;
    QWidget * TextEdit;
    ~MainWindow();

public slots:
    void open();
    void openfile(const QModelIndex &index);
    void savefile();

private:

    void createinterface();
};

#endif // MAINWINDOW_H
